package com.ruoyi.qbms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qbms.mapper.QbmsRecordResolveMapper;
import com.ruoyi.qbms.domain.QbmsRecordResolve;
import com.ruoyi.qbms.service.IQbmsRecordResolveService;

/**
 * 题库解析记录Service业务层处理
 * 
 * @author zouhuu
 * @date 2022-10-24
 */
@Service
public class QbmsRecordResolveServiceImpl implements IQbmsRecordResolveService 
{
    @Autowired
    private QbmsRecordResolveMapper qbmsRecordResolveMapper;

    /**
     * 查询题库解析记录
     * 
     * @param id 题库解析记录主键
     * @return 题库解析记录
     */
    @Override
    public QbmsRecordResolve selectQbmsRecordResolveById(Long id)
    {
        return qbmsRecordResolveMapper.selectQbmsRecordResolveById(id);
    }

    /**
     * 查询题库解析记录列表
     * 
     * @param qbmsRecordResolve 题库解析记录
     * @return 题库解析记录
     */
    @Override
    public List<QbmsRecordResolve> selectQbmsRecordResolveList(QbmsRecordResolve qbmsRecordResolve)
    {
        return qbmsRecordResolveMapper.selectQbmsRecordResolveList(qbmsRecordResolve);
    }

    /**
     * 新增题库解析记录
     * 
     * @param qbmsRecordResolve 题库解析记录
     * @return 结果
     */
    @Override
    public int insertQbmsRecordResolve(QbmsRecordResolve qbmsRecordResolve)
    {
        qbmsRecordResolve.setCreateTime(DateUtils.getNowDate());
        return qbmsRecordResolveMapper.insertQbmsRecordResolve(qbmsRecordResolve);
    }

    /**
     * 修改题库解析记录
     * 
     * @param qbmsRecordResolve 题库解析记录
     * @return 结果
     */
    @Override
    public int updateQbmsRecordResolve(QbmsRecordResolve qbmsRecordResolve)
    {
        qbmsRecordResolve.setUpdateTime(DateUtils.getNowDate());
        return qbmsRecordResolveMapper.updateQbmsRecordResolve(qbmsRecordResolve);
    }

    /**
     * 批量删除题库解析记录
     * 
     * @param ids 需要删除的题库解析记录主键
     * @return 结果
     */
    @Override
    public int deleteQbmsRecordResolveByIds(Long[] ids)
    {
        return qbmsRecordResolveMapper.deleteQbmsRecordResolveByIds(ids);
    }

    /**
     * 删除题库解析记录信息
     * 
     * @param id 题库解析记录主键
     * @return 结果
     */
    @Override
    public int deleteQbmsRecordResolveById(Long id)
    {
        return qbmsRecordResolveMapper.deleteQbmsRecordResolveById(id);
    }
}
